import { createRouter, createWebHistory } from 'vue-router';
import HomeVue from "@/views/Home.vue";
import LoginVue from "@/views/Login.vue";
import RegisterVue from "@/views/Register.vue";
import ForgetPasswordVue from "@/views/ForgetPassword.vue";
import MineVue from "@/views/Mine.vue";
import ProfileVue from "@/views/personal-center/Profile.vue";
import ChangePasswordVue from "@/views/personal-center/ChangePassword.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: '/home',
      name: 'Home',
      component: HomeVue,
    },
    {
      path: '/login',
      name: 'Login',
      component: LoginVue,
    },
    {
      path: '/register',
      name: 'Register',
      component: RegisterVue,
    },
    {
      path: '/forget-password',
      name: 'ForgetPassword',
      component: ForgetPasswordVue,
    },
    {
      path: '/mine',
      name: 'Mine',
      component: MineVue,
    },
    {
      path: '/profile',
      name: 'Profile',
      component: ProfileVue,
    },
    {
      path: '/change-password',
      name: 'ChangePassword',
      component: ChangePasswordVue,
    },
  ]
})

export default router
